/* 
 * File:   Output.cpp
 * Author: k0l0b0k
 * 
 * Created on 8 Октябрь 2009 г., 13:45
 */

#include "OutputStream.h"
#include <stdio.h>

OutputStream Output;

OutputStream::OutputStream()
{
}

OutputStream::~OutputStream()
{
}

void OutputStream::Error(Token* pToken, QString pMessage)
{
	if (pToken)
	{
		Error(pToken->Reader->FileName, pToken->Line, pToken->Col, pMessage);
	}
	else
	{
		Error("Unknown file", 0, 0, pMessage);
	}
}

void OutputStream::Error(QString pFileName, qint32 pLine, qint32 pCol, QString pMessage)
{
	pFileName = QString("%1:%2:%3:%4").arg(pFileName).arg(pLine).arg(pCol).arg(pMessage);
	printf("%s\n", pFileName.toUtf8().data());
}
